class Person {
    private String name;
    private int age;
    private int sex;

    // 构造方法
    public Person(String name, int age, int sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    // study方法
    public void study() {
        System.out.println("studying");
    }

    // showAge方法
    public void showAge() {
        System.out.println("Age: " + age);
    }

    // addAge方法
    public int addAge(int i) {
        age += i;
        return age;
    }
}

class Circle {
    private double radius;

    // 构造方法
    public Circle(double radius) {
        this.radius = radius;
    }

    // 计算圆面积的方法
    public double calculateArea() {
        return Math.PI * radius * radius;
    }
}


public class j0418 {
    public static void main(String[] args) {
        // 创建第一个Person对象
        Person person1 = new Person("CYK", 21, 1);
        person1.study();
        person1.showAge();
        person1.addAge(2);
        person1.showAge();

        // 创建第二个Person对象
        Person person2 = new Person("CKG", 15, 2);
        person2.study();
        person2.showAge();
        person2.addAge(2);
        person2.showAge();

        Circle circle = new Circle(5.0);
        double area = circle.calculateArea();
        System.out.println("圆的面积为: " + area);
    }
}
